package cn.hh.wechatkit.component;

import cn.hh.wechatkit.api.message.WxAppAPI_Message_SendTemplate_API;
import cn.hh.wechatkit.data.postdata.message.meta_SendTemplateMsgData;
import cn.hh.wechatkit.data.returndata.Meta_RMsg_Base;
import cn.hh.wechatkit.exception.Wx_Exception_GetTokenFailed;
import cn.hh.wechatkit.exception.Wx_Exception_InvalidJsonParse;
import cn.hh.wechatkit.exception.Wx_Exception_InvalidResponse;
import cn.hh.wechatkit.helper.CacheHelper;

/**
 * Created this one by HMH on 2018/10/1.
 */
public class WxCom_Message {
    public Meta_RMsg_Base sendTemplateMsg(meta_SendTemplateMsgData msgData) throws Wx_Exception_GetTokenFailed, Wx_Exception_InvalidResponse, Wx_Exception_InvalidJsonParse {
        return WxAppAPI_Message_SendTemplate_API.sendTemplateMsg(msgData, CacheHelper.getAppAccessToken().getAccess_token());
    }
}
